package com.hellowx_ssm.ioc.file;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

/**
 * Created by IntelliJ IDEA.
 *
 * @author MagicMushroom
 * @date 2021/6/5
 */
public class User implements InitializingBean, DisposableBean {
    private String name;
    static {
        System.out.println("User.static 初始值设定项");
    }
    public User(){
        System.out.println("User.User");
    }

    public void setName(String name) {
        System.out.println("User.setName");
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("User.afterPropertiesSet");
    }
    public void myInit(){
        System.out.println("User.MyInit");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("User.destroy");
    }
    public void myDis(){
        System.out.println("User.myDis");
    }
}
